<?php
class Products_model extends CI_Model{
    private  $_table="products";
    function get_products(){
        $query=$this->db->get($this->_table,3,0);
        return $query->result_array();
    }
    function get_where_products($params=array(),$counter=false){
        if(!$counter)
            {
                $query=$this->db->get_where($this->_table,$params);
                return $query->result_array();
            }
        else
            {
               $query=$this->db->get_where($this->_table,$params);
                return $query->num_rows();  
            }
        
    }
    
    function get_products_1(){
        
    }
}
